<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    var number=prompt('请输入您想判断奇数或偶数的值');
    if(number % 2 ==0){
        alert('这是偶数');
    }else if(number % 2 ==1){
        alert('这是奇数');
    }
</script>
<body>

</body>
</html>